<template>
    <div class="header" :style="{ backgroundImage: `url(${seller.avatar})` }">
        <!-- 毛玻璃 -->
        <div class="mask"></div>
        <!-- 内容区域 -->
        <dic class="content">
            <img :src="seller.avatar" alt="">
            <div class="right">
                <h4>{{ seller.name }}</h4>
                <p>{{ seller.description }} / {{ seller.deliveryTime }}分钟送达</p>
                <p>在线支付满28减5，满50减10</p>
                <div class="five">
                    5个 >
                </div>
            </div>
            <div class="tips">
                <p>{{seller.bulletin}}</p>
                <div>></div>
            </div>
        </dic>
    </div>
</template>

<script>
import { mapState, mapActions } from 'vuex';
export default {
    data() {
        return {}
    },
    created() {
        // 调用函数货群头部相关的数据
        this.getSeller()
    },
    methods: {
        ...mapActions(['getSeller'])
    },
    computed: {
        ...mapState(['seller'])
    }
}
</script>

<style scoped>
.header {
    height: 134px;
    overflow: hidden;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.header .mask {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(7, 17, 27, 0.5);
    backdrop-filter: blur(10px);
}

.header .content {
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;

}

.header .content img {
    width: 64px;
    height: 64px;
    margin: 6.4vw 4.267vw 4.8vw 6.4vw;
}

.header .content .right {
    height: 17.067vw;
    margin: 6.4vw 0vw 4.8vw 0vw;
    color: rgb(255, 255, 255);

}

.header .content .right>p:nth-child(2) {
    font-size: 3.2vw;
    margin: 1.333vw 0vw;
    font-weight: 200;
}

.header .content .right>p:nth-child(3) {
    font-size: 2.667vw;
    font-weight: 200;

}

.header .content .right>h4::before {
    content: '品牌';
    background-color: red;
    color: white;
    font-size: 3.467vw;
    padding: 1.067vw;
    margin-right: 1.6vw
}

.header .content .right>p:nth-child(3)::before {
    content: '减';
    background-color: white;
    color: red;
    font-size: 2.667vw;
    padding: 0.267vw;
    border-radius: 0.667vw;
    margin-right: 1.067vw;
}
.header .content .right>.five{
    background-color: rgba(0,0,0,0.2);
    padding:1.867vw 2.667vw;
    padding-left:3.333vw;
    height:6.4vw;
    width:13.333vw;
    border-radius: 4vw;
    position:absolute;
    top:16vw;
    right:2.667vw
}
.tips{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 2.667vw;
    color: #fff;
    padding-left: 12px;
    font-weight: 200;
    background-color: rgba(7,17,27,0.2);
}
.tips>p{
    font-size: 10px;
    height: 28px;
      line-height: 28px;
      width: 85%;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
     
}
.tips>p::before{
    content: '公告';
    color:  gray;
    background-color: white;
    margin-right:1.067vw;
    border-radius: 0.667vw;
    font-weight: bold;
    font-size: 1.6vw;

}
.tips>div{
    font-size: 2.667vw;
    font-weight: 200;
    position: absolute;
    top:1.333vw;
    right: 12vw;
    padding-top:0.667vw
}
</style>